# eric7.Project.CreateDialogCodeDialog

Module implementing a dialog to generate code for a Qt dialog.

### Global Attributes

parameterNamesListRole
parameterTypesListRole
pyqtSignatureRole
pythonSignatureRole
returnTypeRole

### Classes

CreateDialogCodeDialog | Class implementing a dialog to generate code for a Qt dialog.

### Functions

None

## CreateDialogCodeDialog

Class implementing a dialog to generate code for a Qt dialog.

### Derived from

QDialog, Ui_CreateDialogCodeDialog

### Class Attributes

DialogClasses

### Class Methods

None

### Methods

CreateDialogCodeDialog | Constructor
__className | Private method to get the class name of a form.
__generateCode | Private slot to generate Python code as requested by the user.
__mapType | Private method to map a type as reported by Qt's meta object to the correct Python type.
__objectName | Private method to get the object name of a form.
__runUicLoadUi | Private method to run the UicLoadUi.py script with the given command and return the output.
__signatures | Private slot to get the signatures.
__updateSlotsModel | Private slot to update the slots tree display.
initError | Public method to determine, if there was an initialzation error.
on_buttonBox_clicked | Private slot to handle the buttonBox clicked signal.
on_classNameCombo_activated | Private slot to handle the activated signal of the classname combo.
on_filterEdit_textChanged | Private slot called, when thext of the filter edit has changed.
on_newButton_clicked | Private slot called to enter the data for a new dialog class.

### Static Methods

None

#### CreateDialogCodeDialog (Constructor)

CreateDialogCodeDialog(formName, project, parent=None)

Constructor

formName (str)
  name of the file containing the form
project (Project)
  reference to the project object
parent (QWidget)
  parent widget if the dialog

#### CreateDialogCodeDialog.__className

__className()

Private method to get the class name of a form.

Return:
  class name

Return Type:
  str

#### CreateDialogCodeDialog.__generateCode

__generateCode()

Private slot to generate Python code as requested by the user.

#### CreateDialogCodeDialog.__mapType

__mapType(type_)

Private method to map a type as reported by Qt's meta object to the correct Python type.

type_ (QByteArray)
  type as reported by Qt

Return:
  mapped Python type

Return Type:
  str

#### CreateDialogCodeDialog.__objectName

__objectName()

Private method to get the object name of a form.

Return:
  object name

Return Type:
  str

#### CreateDialogCodeDialog.__runUicLoadUi

__runUicLoadUi(command)

Private method to run the UicLoadUi.py script with the given command and return the output.

command (str)
  uic command to be run

Return:
  tuple of process output and error flag

Return Type:
  tuple of (str, bool)

#### CreateDialogCodeDialog.__signatures

__signatures()

Private slot to get the signatures.

Return:
  list of signatures

Return Type:
  list of str

#### CreateDialogCodeDialog.__updateSlotsModel

__updateSlotsModel()

Private slot to update the slots tree display.

#### CreateDialogCodeDialog.initError

initError()

Public method to determine, if there was an initialzation error.

Return:
  flag indicating an initialzation error

Return Type:
  bool

#### CreateDialogCodeDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot to handle the buttonBox clicked signal.

button (QAbstractButton)
  reference to the button that was clicked

#### CreateDialogCodeDialog.on_classNameCombo_activated

on_classNameCombo_activated(_index)

Private slot to handle the activated signal of the classname combo.

_index (int)
  index of the activated item (unused)

#### CreateDialogCodeDialog.on_filterEdit_textChanged

on_filterEdit_textChanged(text)

Private slot called, when thext of the filter edit has changed.

text (str)
  changed text

#### CreateDialogCodeDialog.on_newButton_clicked

on_newButton_clicked()

Private slot called to enter the data for a new dialog class.

Up